﻿@model AppConfigurationMVC.Models.ConfigurationModels
           
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@{
    ViewBag.Title = "Edit Configuration";
}

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Edit Configuration</legend>
        
        <div class="editor-field" style="display:none">
            @Html.EditorFor(model => model.ConfigID)
            @Html.ValidationMessageFor(model => model.ConfigID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ConfigKey) : <b>@Html.DisplayFor(model => model.ConfigKey)</b>
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ConfigValue)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ConfigValue)
            @Html.ValidationMessageFor(model => model.ConfigValue)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ConfigReason)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ConfigReason)
            @Html.ValidationMessageFor(model => model.ConfigReason)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ConfigEnabled)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ConfigEnabled)
            @Html.ValidationMessageFor(model => model.ConfigEnabled)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
